package androidx.test.espresso;

import androidx.test.espresso.core.internal.deps.guava.base.Preconditions;
import java.util.List;
import org.hamcrest.Matcher;

/* loaded from: classes.dex */
public final class NoMatchingRootException extends RuntimeException implements EspressoException {
    private NoMatchingRootException(String description) {
        super(description);
    }

    public static NoMatchingRootException create(Matcher<Root> rootMatcher, List<Root> roots) {
        Preconditions.checkNotNull(rootMatcher);
        Preconditions.checkNotNull(roots);
        return new NoMatchingRootException(String.format("Matcher '%s' did not match any of the following roots: %s", rootMatcher, roots));
    }
}
